/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.mobbuzz.facade;

import edu.mobbuzz.bean.Label;
import edu.mobbuzz.storage.LabelRecordStore;
import java.util.Vector;

public class LabelFacade {
    private LabelRecordStore labelRS;

    public LabelRecordStore getLabelRS() {
        if(labelRS==null){
            labelRS = new LabelRecordStore();
        }
        return labelRS;
    }

    public Vector getLabelByRss (int rssRecId){
        return getLabelRS().getLabelByRss(rssRecId);
    }

    public Vector getDeletedIndexLabelByCategory (int categoryRecId){
        return getLabelRS().getDeletedIndexLabelByCategory(categoryRecId);
    }

    public Vector getDeletedIndexLabelByRssAndCategory (int rssRecId, int categoryRecId){
         return getLabelRS().getDeletedIndexLabelByRssAndCategory(rssRecId, categoryRecId);
    }
    
    public boolean isLabelByRssAndCategory (int rssRecId, int categoryRecId){
        return getLabelRS().isLabelByRssAndCategory(rssRecId, categoryRecId);
    }
    
    public Label getLabel (int recId){
        return getLabelRS().getLabel(recId);
    }

    public int getIndex (int recId){
        return getLabelRS().getIndex(recId);
    }   
    
    public void addLabel(Label label){
         getLabelRS().addLabel(label);
    }

     public void updateLabel(int index, Label label){
         getLabelRS().updateLabel(index, label);
    }

    public void deleteLabel(int index){
         getLabelRS().deleteLabel(index);
    }

    public void closeLabelRS(){
         getLabelRS().closeRecStore();
    }

   
    
    
}
